import request from '@/utils/request';
import { other } from './prefix';

const PicConfigManage = {
  // 查询文章列表
  getPicList(params) {
    return request.get(other + '/about_pic', { params });
  },
  // 创建文章
  setAbout(params) {
    return request.post(other + '/evaluate', params);
  },
  // 更新文章
  updAbout(id, params) {
    return request.post(other + '/about_pic/' + id, params);
  },
  // 删除文章
  delPic(id) {
    return request.delete(other + '/about_pic/' + id);
  },
  // 上传图片
  uploadPic(params) {
    return request.post(other + '/about_pic?op=upload_file&name=picture_url', params);
  },
  // 更新图片
  updatePic(id, params) {
    return request.post(other + '/about_pic/' + id + '?op=upload_file&name=picture_url', params);
  },
};

export default PicConfigManage;
